#!/usr/bin/env coffee

import Redis from 'ioredis'

if process.env.NODE_ENV != 'production'
  do =>
    await import('./dev')

export default (config)=>
  redis = new Redis(config)
  redis.on 'error', (err)=>
    console.trace(err)
    return
  redis
